SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE VIEW dbo.vwlSolicitudes
AS
SELECT     dbo.tb_Solicitudes.idSolicitud AS Id, dbo.tb_Solicitudes.Alumno, dbo.tb_Solicitudes.Fecha, dbo.vwrTiposDeSolicitudes.Descripcion AS TipoSolicitud, 
                      dbo.tb_Solicitudes.Cantidad, dbo.tb_Solicitudes.Urgencia, dbo.tb_Solicitudes.FechaInicio, dbo.tb_Solicitudes.FechaFin, 
                      dbo.tb_Solicitudes.Observaciones
FROM         dbo.tb_Solicitudes INNER JOIN
                      dbo.vwrTiposDeSolicitudes ON dbo.tb_Solicitudes.TipoSolicitud = dbo.vwrTiposDeSolicitudes.Id LEFT OUTER JOIN
                      dbo.vwrLineasDeBYP ON dbo.tb_Solicitudes.idLineaDeByP = dbo.vwrLineasDeBYP.Id
GO
GRANT SELECT ON  [dbo].[vwlSolicitudes] TO [Becas]
GRANT SELECT ON  [dbo].[vwlSolicitudes] TO [SoloVer]
GO
